<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>MiXiM: D:/Projects/MiXiM/extsrc/mixim/src/inet_stub/mobility/models/Posture.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">MiXiM
   &#160;<span id="projectnumber">2.3</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('a00369.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">Posture.h</div>  </div>
</div>
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* -*- mode:c++ -*- ********************************************************</span>
<a name="l00002"></a>00002 <span class="comment"> * file:        Posture.h</span>
<a name="l00003"></a>00003 <span class="comment"> *</span>
<a name="l00004"></a>00004 <span class="comment"> * author:      Majid Nabi &lt;m.nabi@tue.nl&gt;</span>
<a name="l00005"></a>00005 <span class="comment"> *</span>
<a name="l00006"></a>00006 <span class="comment"> *</span>
<a name="l00007"></a>00007 <span class="comment"> *              http://www.es.ele.tue.nl/nes</span>
<a name="l00008"></a>00008 <span class="comment"> *</span>
<a name="l00009"></a>00009 <span class="comment"> * copyright:   (C) 2010 Electronic Systems group(ES),</span>
<a name="l00010"></a>00010 <span class="comment"> *              Eindhoven University of Technology (TU/e), the Netherlands.</span>
<a name="l00011"></a>00011 <span class="comment"> *</span>
<a name="l00012"></a>00012 <span class="comment"> *</span>
<a name="l00013"></a>00013 <span class="comment"> *              This program is free software; you can redistribute it</span>
<a name="l00014"></a>00014 <span class="comment"> *              and/or modify it under the terms of the GNU General Public</span>
<a name="l00015"></a>00015 <span class="comment"> *              License as published by the Free Software Foundation; either</span>
<a name="l00016"></a>00016 <span class="comment"> *              version 2 of the License, or (at your option) any later</span>
<a name="l00017"></a>00017 <span class="comment"> *              version.</span>
<a name="l00018"></a>00018 <span class="comment"> *              For further information see file COPYING</span>
<a name="l00019"></a>00019 <span class="comment"> *              in the top level directory</span>
<a name="l00020"></a>00020 <span class="comment"> ***************************************************************************</span>
<a name="l00021"></a>00021 <span class="comment"> * part of:    MoBAN (Mobility Model for wireless Body Area Networks)</span>
<a name="l00022"></a>00022 <span class="comment"> * description: A class to store the specification of a posture</span>
<a name="l00023"></a>00023 <span class="comment"> ***************************************************************************</span>
<a name="l00024"></a>00024 <span class="comment"> * Citation of the following publication is appreciated if you use MoBAN for</span>
<a name="l00025"></a>00025 <span class="comment"> * a publication of your own.</span>
<a name="l00026"></a>00026 <span class="comment"> *</span>
<a name="l00027"></a>00027 <span class="comment"> * M. Nabi, M. Geilen, T. Basten. MoBAN: A Configurable Mobility Model for Wireless Body Area Networks.</span>
<a name="l00028"></a>00028 <span class="comment"> * In Proc. of the 4th Int&#39;l Conf. on Simulation Tools and Techniques, SIMUTools 2011, Barcelona, Spain, 2011.</span>
<a name="l00029"></a>00029 <span class="comment"> *</span>
<a name="l00030"></a>00030 <span class="comment"> * BibTeX:</span>
<a name="l00031"></a>00031 <span class="comment"> *        @inproceedings{MoBAN,</span>
<a name="l00032"></a>00032 <span class="comment"> *         author = &quot;M. Nabi and M. Geilen and T. Basten.&quot;,</span>
<a name="l00033"></a>00033 <span class="comment"> *          title = &quot;{MoBAN}: A Configurable Mobility Model for Wireless Body Area Networks.&quot;,</span>
<a name="l00034"></a>00034 <span class="comment"> *        booktitle = &quot;Proceedings of the 4th Int&#39;l Conf. on Simulation Tools and Techniques.&quot;,</span>
<a name="l00035"></a>00035 <span class="comment"> *        series = {SIMUTools &#39;11},</span>
<a name="l00036"></a>00036 <span class="comment"> *        isbn = {978-963-9799-41-7},</span>
<a name="l00037"></a>00037 <span class="comment"> *        year = {2011},</span>
<a name="l00038"></a>00038 <span class="comment"> *        location = {Barcelona, Spain},</span>
<a name="l00039"></a>00039 <span class="comment"> *        publisher = {ICST} }</span>
<a name="l00040"></a>00040 <span class="comment"> *</span>
<a name="l00041"></a>00041 <span class="comment"> **************************************************************************/</span>
<a name="l00042"></a>00042 
<a name="l00043"></a>00043 
<a name="l00044"></a>00044 <span class="preprocessor">#ifndef POSTURE_H</span>
<a name="l00045"></a>00045 <span class="preprocessor"></span><span class="preprocessor">#define POSTURE_H</span>
<a name="l00046"></a>00046 <span class="preprocessor"></span>
<a name="l00047"></a>00047 <span class="preprocessor">#include &lt;string.h&gt;</span>
<a name="l00048"></a>00048 
<a name="l00049"></a>00049 <span class="preprocessor">#include &quot;Coord.h&quot;</span>
<a name="l00050"></a>00050 
<a name="l00051"></a>00051 
<a name="l00060"></a><a class="code" href="a00178.html">00060</a> <span class="keyword">class </span><a class="code" href="a00178.html" title="to store the specification of a posture on the MoBAN mobility model.">Posture</a> {
<a name="l00061"></a>00061   <span class="keyword">protected</span>:
<a name="l00063"></a><a class="code" href="a00178.html#a26f00ed7a91cb2212501f96b3dfff654">00063</a>     <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="a00178.html#a26f00ed7a91cb2212501f96b3dfff654" title="Number of nodes existing in the WBAN.">numNodes</a>;
<a name="l00064"></a>00064 
<a name="l00066"></a><a class="code" href="a00178.html#a0c4a1ffae7770c12c0cdf627e8874bff">00066</a>     <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="a00178.html#a0c4a1ffae7770c12c0cdf627e8874bff" title="The unique ID of the posture.">postureID</a>;
<a name="l00067"></a>00067 
<a name="l00069"></a><a class="code" href="a00178.html#a0766a3ff345ed3c738646a0b72bde74a">00069</a>     <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a>* <a class="code" href="a00178.html#a0766a3ff345ed3c738646a0b72bde74a" title="The relative reference position of each node in this posture.">nodePs</a>;
<a name="l00070"></a>00070 
<a name="l00073"></a><a class="code" href="a00178.html#a411eac6d222e4c69eaeb3ae0b914ce12">00073</a>     <span class="keywordtype">char</span> <a class="code" href="a00178.html#a411eac6d222e4c69eaeb3ae0b914ce12" title="A given name to the posture like walking, sitting. It might be used for showing the current posture i...">posture_name</a>[50];
<a name="l00074"></a>00074 
<a name="l00077"></a><a class="code" href="a00178.html#a06c51a1bf4c89b12a3c317f6ae3fc044">00077</a>     <span class="keywordtype">double</span>** <a class="code" href="a00178.html#a06c51a1bf4c89b12a3c317f6ae3fc044" title="Mean value of the normal distribution for the path lost coefficient (alpha) for any pair of nodes (nu...">alphaMean</a>;
<a name="l00078"></a>00078 
<a name="l00081"></a><a class="code" href="a00178.html#a88871af13632952bcfc8996c5eef3906">00081</a>     <span class="keywordtype">double</span>** <a class="code" href="a00178.html#a88871af13632952bcfc8996c5eef3906" title="Mean value of the normal distribution for the path lost coefficient (alpha) for any pair of nodes (nu...">alphaSD</a>;  <span class="comment">// Standard deviation of alpha</span>
<a name="l00082"></a>00082 
<a name="l00084"></a><a class="code" href="a00178.html#afb21a48b225752f643ce8494393a5d1c">00084</a>     <span class="keywordtype">double</span>* <a class="code" href="a00178.html#afb21a48b225752f643ce8494393a5d1c" title="Radious of the sphere around each node for individual mobility.">nodeRadius</a>;
<a name="l00085"></a>00085 
<a name="l00087"></a><a class="code" href="a00178.html#aeb6512db7e7ac1718971b2e777754935">00087</a>     <span class="keywordtype">double</span>* <a class="code" href="a00178.html#aeb6512db7e7ac1718971b2e777754935" title="Movement speed of the node for individual mobility.">nodeSpeed</a>;
<a name="l00088"></a>00088 
<a name="l00090"></a><a class="code" href="a00178.html#a1d16f0f0138a5a57c72519d1a3914e69">00090</a>     <span class="keywordtype">double</span> <a class="code" href="a00178.html#a1d16f0f0138a5a57c72519d1a3914e69" title="Maximum value of the speed range for the global movement in this posture.">maxSpeed</a>;
<a name="l00091"></a>00091 
<a name="l00093"></a><a class="code" href="a00178.html#a259a565c328c6ca2c31ae02f7d4ba933">00093</a>     <span class="keywordtype">double</span> <a class="code" href="a00178.html#a259a565c328c6ca2c31ae02f7d4ba933" title="Minimum value of the speed range for the global movement in this posture.">minSpeed</a>;
<a name="l00094"></a>00094 
<a name="l00095"></a>00095   <span class="keyword">public</span>:
<a name="l00097"></a>00097     <a class="code" href="a00178.html#a2220f047525bfaca36d875fe57aef363" title="Construct a posture object with the given ID and number of nodes, respectively.">Posture</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>);
<a name="l00098"></a>00098 
<a name="l00100"></a><a class="code" href="a00178.html#a54ea07f82d8f757b9c1514f9ccbc6d6a">00100</a>     <span class="keywordtype">int</span> <a class="code" href="a00178.html#a54ea07f82d8f757b9c1514f9ccbc6d6a" title="Return the number of nodes existing in the WBAN.">getNumNodes</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="a00178.html#a26f00ed7a91cb2212501f96b3dfff654" title="Number of nodes existing in the WBAN.">numNodes</a>; }
<a name="l00101"></a>00101 
<a name="l00103"></a>00103     <span class="keywordtype">bool</span> <a class="code" href="a00178.html#a12591a1dc501c32eecd9c422d322dcea" title="Set the given name for the posture.">setPostureName</a>(<span class="keywordtype">char</span> *);
<a name="l00104"></a>00104 
<a name="l00106"></a>00106     <span class="keywordtype">bool</span> <a class="code" href="a00178.html#a8517a4c793e02f5f4cbf4cd589c2bf39" title="Set the minimum and maximum value for the speed range of the whole WBAN (global movement) in this pos...">setPostureSpeed</a>(<span class="keywordtype">double</span>, <span class="keywordtype">double</span>);
<a name="l00107"></a>00107 
<a name="l00109"></a>00109     <span class="keywordtype">bool</span> <a class="code" href="a00178.html#a38d971ecc896965e6f70564598b53649" title="Set the radius of the sphere for movement of a singular node in this posture.">setRadius</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>, <span class="keywordtype">double</span>);
<a name="l00110"></a>00110 
<a name="l00112"></a>00112     <span class="keywordtype">bool</span> <a class="code" href="a00178.html#a9a1ae808066c4ffcdf73a7bc683cf456" title="Set the velocity for movement of a singular node in this posture.">setSpeed</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>, <span class="keywordtype">double</span>);
<a name="l00113"></a>00113 
<a name="l00115"></a>00115     <span class="keywordtype">bool</span> <a class="code" href="a00178.html#ac6e3fd122b7b79699a4b30ebe558b087" title="Set the relative position of a node in this posture.">setPs</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>, <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a>);
<a name="l00116"></a>00116 
<a name="l00118"></a>00118     <span class="keywordtype">bool</span> <a class="code" href="a00178.html#a4fef8b2a4301bbb7dd23ad64ccc04570" title="Set the mean value of a normal distribution for path lost coefficient of wave propagation between two...">setAlphaMean</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>, <span class="keywordtype">double</span>);
<a name="l00119"></a>00119 
<a name="l00121"></a>00121     <span class="keywordtype">bool</span> <a class="code" href="a00178.html#a01d63cc271da802b847daa39300b363f" title="Set the standard deviation of a normal distribution for path lost coefficient of wave propagation bet...">setAlphaSD</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>, <span class="keywordtype">double</span>);
<a name="l00122"></a>00122 
<a name="l00124"></a>00124     <span class="keywordtype">bool</span> <a class="code" href="a00178.html#a7057d6de18f8fd8d646e0d370ab8c2a5" title="Check if this posture is mobile by checking the maximum possible speed.">isMobile</a>();
<a name="l00125"></a>00125 
<a name="l00127"></a>00127     <span class="keywordtype">int</span> <a class="code" href="a00178.html#a217bc7334d61b9441c06affd81798445" title="Returns the unique Id (index) of this posture.">getPostureID</a>();
<a name="l00128"></a>00128 
<a name="l00130"></a>00130     <span class="keywordtype">char</span>* <a class="code" href="a00178.html#a40dc6d7007b14e779420da389e927aec" title="Returns posture name.">getPostureName</a>();
<a name="l00131"></a>00131 
<a name="l00133"></a>00133     <span class="keywordtype">double</span> <a class="code" href="a00178.html#a99d879a60f411811fad6949c3b7811a3" title="Returns maximum value of the speed range of this posture.">getMaxSpeed</a>();
<a name="l00134"></a>00134 
<a name="l00136"></a>00136     <span class="keywordtype">double</span> <a class="code" href="a00178.html#ac805f463e2f12178b128f741cfc2f8ec" title="Returns minimum value of the speed range of this posture.">getMinSpeed</a>();
<a name="l00137"></a>00137 
<a name="l00139"></a>00139     <span class="keywordtype">double</span> <a class="code" href="a00178.html#a3b0ae5a46b6e562838f968cd1bb06b91" title="Returns the singular movement radius of a node in this posture.">getRadius</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>);
<a name="l00140"></a>00140 
<a name="l00142"></a>00142     <span class="keywordtype">double</span> <a class="code" href="a00178.html#ad29284231df7d01bf47f1aaaad192103" title="Returns the singular movement speed of a node in this posture.">getSpeed</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>);
<a name="l00143"></a>00143 
<a name="l00145"></a>00145     <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a>  <a class="code" href="a00178.html#a6cce5bfb2a17e71e346d7fd699139820" title="Returns the relative position of a node in this posture.">getPs</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>);
<a name="l00146"></a>00146 
<a name="l00148"></a>00148     <span class="keywordtype">double</span> <a class="code" href="a00178.html#a4ebf4ddceab8eeaf1a2f802e07750540" title="Returns the mean value of a normal distribution for path lost coefficient of wave propagation between...">getAlphaMean</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>);
<a name="l00149"></a>00149 
<a name="l00151"></a>00151     <span class="keywordtype">double</span> <a class="code" href="a00178.html#a8e474d473692d0000790db17918e8a2b" title="Returns the standard deviation of a normal distribution for path lost coefficient of wave propagation...">getAlphaSD</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>);
<a name="l00152"></a>00152 };
<a name="l00153"></a>00153 
<a name="l00154"></a>00154 <span class="preprocessor">#endif</span>
</pre></div></div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>Posture.h</b>      </li>

    <li class="footer">Generated on Tue Mar 5 2013 21:26:30 for MiXiM by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
